﻿using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace ZenSystemService.Api.Migrations
{
    /// <inheritdoc />
    public partial class TraineeOrder : Migration
    {
        /// <inheritdoc />
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropColumn(
                name: "HasAttendCourseCount",
                table: "Users");

            migrationBuilder.RenameColumn(
                name: "TotalCourseCount",
                table: "Users",
                newName: "ParentUserId");

            migrationBuilder.AddColumn<bool>(
                name: "ExamineIsAdopt",
                table: "Users",
                type: "tinyint(1)",
                nullable: true);

            migrationBuilder.AddColumn<decimal>(
                name: "Price",
                table: "CourseTypes",
                type: "decimal(65,30)",
                nullable: false,
                defaultValue: 0m);
        }

        /// <inheritdoc />
        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropColumn(
                name: "ExamineIsAdopt",
                table: "Users");

            migrationBuilder.DropColumn(
                name: "Price",
                table: "CourseTypes");

            migrationBuilder.RenameColumn(
                name: "ParentUserId",
                table: "Users",
                newName: "TotalCourseCount");

            migrationBuilder.AddColumn<int>(
                name: "HasAttendCourseCount",
                table: "Users",
                type: "int",
                nullable: true);
        }
    }
}
